import { Node } from "cc";
import { ecs } from "db://app-game/libs/ecs/ECS";
import { UIID } from "../../../common/config/GameUIConfig";

/** 加载基础信息 */
@ecs.register("LoadDataModel")
export class LoadDataModelComp extends ecs.Comp {
  /** 加载资源路径 */
  loadPaths: { text: string; path: string }[] = [];
  /** 跳转页面 */
  uiid: UIID = UIID.Loading;
  /** 加载资源回调 */
  jumpCompleted: (node: Node) => void = (node: Node) => {};

  reset(entity: ecs.Entity): void {
    this.uiid = UIID.Loading;
    this.jumpCompleted = (node: Node) => {};
  }
}
